import request from '/@/api/request'

/** 发送手机短信验证码 */
export const requestSendSmsCode = (data: SendSmsCodeTypes.IRequest) => {
  return request.post<IBaseResponse<SendSmsCodeTypes.IResponse>>('/system/ysys-user/unAuth/sms/sendSmsCode/V1', data)
}

/** 邮箱注册发送验证码 */
export const requestSendEmailRegisterCode = (data: SmsSendEmailRegisterCodeTypes.IRequest) => {
  return request.post<IBaseResponse<SmsSendEmailRegisterCodeTypes.IResponse>>('/system/ysys-user/unAuth/sms/sendEmailRegisterCode/V1', data)
}

/** 校验手机短信验证码 */
export const requestCheckSmsCode = (data: CheckSmsCodeTypes.IRequest) => {
  return request.post<IBaseResponse<CheckSmsCodeTypes.IResponse>>('/system/ysys-user/unAuth/sms/checkSmsCode/V1', data)
}

/** 发送邮箱验证码 */
export const requestSendEmailLoginCode = (data: SendEmailLoginCodeTypes.IRequest) => {
  return request.post<IBaseResponse<SendEmailLoginCodeTypes.IResponse>>('/system/ysys-user/unAuth/sms/sendEmailLoginCode/V1', data)
}

/** 校验邮箱验证码 */
export const requestCheckEmailCode = (data: CheckEmailCodeTypes.IRequest) => {
  return request.post<IBaseResponse<CheckEmailCodeTypes.IResponse>>('/system/ysys-user/unAuth/sms/checkEmailCode/V1', data)
}
